package com.ycfmedical.bed.ui.fragment;

import com.ycfmedical.bed.HisConstants;
import com.ycfmedical.bed.adapter.HisBillInfoAdapter;
import com.ycfmedical.bed.base.BaseHisFragment;
import com.ycfmedical.bed.local.entity.HisSystemInfo;

import cn.droidlover.xdroidmvp.base.SimpleRecAdapter;
import cn.droidlover.xrecyclerview.RecyclerItemCallback;
import cn.droidlover.xrecyclerview.XRecyclerView;

/**
 * Created by Administrator on 2017/3/16 0016.
 */

public class DiagnosisHistoryFragment extends BaseHisFragment
{
    HisBillInfoAdapter adapter;

    @Override
    public int getType()
    {
        return HisConstants.HISTORY_DIAGNOSIS;
    }

    @Override
    public SimpleRecAdapter getAdapter()
    {
        if (adapter == null)
        {
            adapter = new HisBillInfoAdapter(context);

//            // 设置点击事件，点击Item
//            adapter.setRecItemClick(new RecyclerItemCallback<HisSystemInfo, HisBillInfoAdapter.ViewHolder>()
//            {
//                @Override
//                public void onItemClick(int position, HisSystemInfo model, int tag,
//                    HisBillInfoAdapter.ViewHolder holder)
//                {
//                    super.onItemClick(position, model, tag, holder);
//                }
//            });
        }
        return adapter;
    }

    @Override
    public void setLayoutManager(XRecyclerView recyclerView)
    {
        recyclerView.verticalLayoutManager(context);
    }

    public static DiagnosisHistoryFragment newInstance()
    {

        return new DiagnosisHistoryFragment();
    }
}
